﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UM_SERVER.Triggers
{
    class TriggerManager : Manager
    {
        /// <summary>
        ///     通过指定Key得到触发器
        /// </summary>
        /// <param name="Key">唯一标示</param>
        /// <returns>返回null, 则表示该Key不存在</returns>
        public BaseTrigger GetTriggerByKey(String Key)
        {
            foreach (IMetaData imeta in this.Collection)
            {
                if (imeta.Key == Key)
                {
                    return imeta as BaseTrigger;
                }
            }
            return null;
        }
    }
}
